package com.xk857.pojo;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 路口，配合设置红绿灯
 * @Author CV大魔王
 * @Date 2020.1.20
 */
@ApiModel("路口红绿灯状态")
@Data
public class Intersection {

    @NotNull
    @Pattern(regexp = "^(1-1)|(1-2)|(2-1)|(2-2)$",message = "未查询红绿灯信息")
    @ApiModelProperty("表示在哪个路口， 1-1表示1路横向, 1-2表示1路纵向")
    private String trafficLightId;

    @ApiModelProperty("红绿灯状态")
    @Pattern(regexp = "^(Red)|(Green)|(Yellow)$",message = "红绿灯状态设置有误")
    private String status;

    @NotNull
    @ApiModelProperty("红绿灯时间")
    private Integer time;


}
